/*
*	New C++ File starts here.
*	This file should be named myconf.cc
*/

// Include all NML, CMS, and RCS classes and functions
#include "rcs.hh"

// Include command and status message definitions
#include "myconf.h"

// Include externally supplied prototypes
#include "myconf_n_codegen_protos.hh"



#ifndef MAX_MY_CONF_NAME_LENGTH
#define MAX_MY_CONF_NAME_LENGTH 8
#endif
#ifndef MY_CONF_NAME_LIST_LENGTH
#define MY_CONF_NAME_LIST_LENGTH 2
#endif


/* This list must be in alphabetical order and the three lists must correspond. */
const char MY_CONF_name_list[MY_CONF_NAME_LIST_LENGTH][MAX_MY_CONF_NAME_LENGTH]= {
	"MY_CONF", /* 0,10001 */
	""};
const NMLTYPE MY_CONF_id_list[MY_CONF_NAME_LIST_LENGTH]= {
	MY_CONF_TYPE, /* 0,10001 */
	-1};
const size_t MY_CONF_size_list[MY_CONF_NAME_LIST_LENGTH]= {
	sizeof(MY_CONF),
	0};
const char *MY_CONF_symbol_lookup(long type);


// Enumerated Type Constants

/*
Estimated_size	MY_CONF	40
Estimated_size	MAXIMUM	40
*/
/*
*	NML/CMS Format function : MY_CONF_format
*	Automatically generated by NML CodeGen Java Applet.
*	on Tue May 13 15:20:36 GMT-05:00 2008
*/
int MY_CONF_format(NMLTYPE type, void *buffer, CMS *cms)
{

	type = cms->check_type_info(type,buffer,"MY_CONF",
		(cms_symbol_lookup_function_t) MY_CONF_symbol_lookup,
		(const char **)MY_CONF_name_list,
		MY_CONF_id_list,MY_CONF_size_list,
		MY_CONF_NAME_LIST_LENGTH,
		MAX_MY_CONF_NAME_LENGTH);

	switch(type)
	{
	case MY_CONF_TYPE:
		((MY_CONF *) buffer)->update(cms);
		break;

	default:
		return(0);
	}
	return 1;
}


// NML Symbol Lookup Function
const char *MY_CONF_symbol_lookup(long type)
{
	switch(type)
	{
	case MY_CONF_TYPE:
		return "MY_CONF";
	default:
		return"UNKNOWN";
		break;
	}
	return(NULL);
}

/*
*	NML/CMS Update function for MY_CONF
*	Automatically generated by NML CodeGen Java Applet.
*	on Tue May 13 15:20:37 GMT-05:00 2008
*/
void MY_CONF::update(CMS *cms)
{

	cms->beginClass("MY_CONF","NMLmsg");
	cms->update_with_name("p_gain",p_gain);
	cms->update_with_name("i_gain",i_gain);
	cms->update_with_name("d_gain",d_gain);

	cms->endClass("MY_CONF","NMLmsg");

}

/*
*	Constructor for MY_CONF
*	Automatically generated by NML CodeGen Java Applet.
*	on Tue May 13 15:20:37 GMT-05:00 2008
*/
MY_CONF::MY_CONF()
	: NMLmsg(MY_CONF_TYPE,sizeof(MY_CONF))
{
	p_gain = (double) 0;
	i_gain = (double) 0;
	d_gain = (double) 0;

}

